{echo:JS::import('dialog?skin=brief');}
{echo:JS::import('dialogtools');}
<form action="" method="post">
<div class="tools_bar clearfix">
    <a class="icon-delicious" href="{url:/order/hebing_order_list}"> 全部订单</a>
    <a class="icon-eye-blocked" href="{url:/order/hebing_order_list/status/1}"> 未付款</a>
    <a class="icon-cogs" href="{url:/order/hebing_order_list/status/2}"> 已付款</a>
    <span class="fr"><a class="btn" href="javascript:;" id="btnSearch">查询</a></span>
    <span class="fr"><input type="text" placeholder="请输入合并订单号" id="txtHbOrderNo"/></span>
    
<!-- 
    <span class="fr"><a href='javascript:;' id="condition" class="icon-search" style="" > 筛选条件</a><input id="condition_input" type="hidden" name="condition" value="{$condition}"></span>
     -->
</div>
<table class="default" >
    <tr>
        <th style="width:60px">操作</th>
        <th style="width:100px">会员账号</th>
        <th style="width:150px">合并订单号</th>
        <th style="width:200px">所属子订单</th>
        <th style="width:60px">商品总额(￥)</th>
        <th style="width:100px">订单状态</th>
        <!-- 
        <th style="width:60px">{$k_cb} </th>
        <th style="width:70px">会员账号</th>
        <th style="width:60px">物流类型</th>
        <th style="width:70px">收货人</th>
        <th style="width:80px">收货人电话</th>
        <th style="width:80px">支付方式</th>
        
        <th style="width:50px">支付状态</th>
         
        <th style="width:50px">配送状态</th>
        <th style="width:50px">订单状态</th>
        <th style="width: 60px">打印</th>
         -->  
    </tr>
    
     {query:name=demo_order where=$where id=$obj page=1 order=id desc}
        <tr>
            <td style="width:70px" class="btn_min"><div class="operat hidden"><a  class="icon-cog action" href="javascript:;"> 处理</a><div class="menu_select"><ul>
                <li>
                	<!-- 
                	<a class="icon-close" href="javascript:confirm_action('{url:/order/hebing_order_del/id/$item[id]}')"> 删除</a>
                	 -->
                </li>
               <td>
            	{echo:Common::getUserInfoByUId($item['user_id'])['name']}
            </td>
            <td style="width:110px">{$item['order_no']}</td>
            
            <td style="width:120px">
            
            {set:$child_order_str=explode(',',$item['child_order_no'])}
            {list:$items=$child_order_str item=$demo}
            {set:$v=Common::getOrderInfoByONo($demo)}
            	{$demo} &nbsp;<a href="javascript:;" onclick="view({$v[id]})">查看</a>
            	<br>
            {/list}
            </td>
            
            <td style="width:60px">{$item['order_amount']}</td>
            
            <td>
            	{if:$item['status'] == 0}
            		<b class='red'>未付款</b>
            	{else:}
            		<b class='green'>已付款</b>
            	{/if}
            </td>
            
        </tr>
    {/query}
</table>
</form>
<div class="page_nav">
{echo:$obj->pageBar()}
</div>
<div id="status_dialog" style="display: none; position: relative;" class="form2">
    <h3 id="order_title">备注信息：</h3>
        <input type="hidden" name="id" id="order_id" value="">
        <input type="hidden" name="status" id="order_status" value="">
        <input type="hidden" name="op" id="order_op" value="">
        <textarea id="order_remark" name="remark"></textarea>
    <div class="tc"><button class="focus_button" onclick="submit_status()">保存</button></div>
</div>
<script type="text/javascript">
$("#btnSearch").click(function(){
	var hbOrderNo=$("#txtHbOrderNo").val();
	//var url="http://localhost/qcshop/index.php?con=order&act=hebing_order_list&hbOrderNo="+hbOrderNo;
	var url="{url:/order/hebing_order_list}&hbOrderNo="+hbOrderNo;
	//"http://qcjn99.com/index.php?con=order&act=hebing_order_list&hbOrderNo="+hbOrderNo;
	if(hbOrderNo =="" || hbOrderNo == null)
	{
		//url = "http://localhost/qcshop/index.php?con=order&act=hebing_order_list";
		var url="{url:/order/hebing_order_list}";
	}
	
	document.location.href = url;
});

function view(id){
    art.dialog.open("{url:/order/order_view/id/}"+id,{id:'view_dialog',title:'查看订单',resize:false,width:900,height:450});
}
</script>